<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>系统管理员 HDSysCms</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="<?php echo getcdnurlhost() ?>/admin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="<?php echo getcdnurlhost() ?>/admin/style/admin.css" media="all">
<link rel="stylesheet" href="<?php echo getcdnurlhost() ?>/admin/layui_ext/dtree/dtree.css">
<link rel="stylesheet" href="<?php echo getcdnurlhost() ?>/admin/layui_ext/dtree/font/dtreefont.css">
<link rel="stylesheet" href="<?php echo getcdnurlhost() ?>/markdown/css/editormd.min.css" />
</head>
<body data="HDSYSCMS 2021本系统受国家版权局保护请勿破解或者二次开发传播">
<div class="layui-fluid">
<div class="layui-row layui-col-space15">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-header">编辑栏目</div>
<div class="layui-card-body">
<form class="layui-form" action="#">
<div class="layui-form-item">
<label class="layui-form-label">栏目ID</label>
<div class="layui-input-inline" style="width: 400px;">
<input type="hidden" name="id" value="<?php echo $param_db_array_value['id'] ?>" >
</div>
<div class="layui-form-mid layui-word-aux"><?php echo $param_db_array_value['id'] ?> <i onclick="show_code('{$data.id}','')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">上级栏目</label>
<div class="layui-input-inline" style="width: 400px;">
<ul id="seltree" class="dtree" data-id="0"></ul>
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code('{$data.pid}','')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>
<input type="hidden" name="id" value="<?php echo $param_db_array_value['pid'] ?>">
<div class="layui-form-item">
<label class="layui-form-label">栏目名称</label>
<div class="layui-input-inline">
<input type="text" name="name" value="<?php echo $param_db_array_value['name'] ?>" lay-verify="required" placeholder="栏目名称" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code('{$data.name}','')" class="code-show layui-icon layui-icon-tips"></i>*必填</div>
</div>
<div class="layui-form-item en-hide">
<label class="layui-form-label en">栏目名称(英)</label>
<div class="layui-input-inline">
<input type="text" name="ename" value="<?php echo $param_db_array_value['ename'] ?>" placeholder="栏目名称(英)" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code('{$data.ename}','')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">视图模版</label>
<div class="layui-input-inline">
<select name="template" id="template" lay-filter="template" lay-verify="required">
<option value="">请选择视图模版</option>
<?php
echo $param_templates ?>
<option value="jmp">跳转连接</option>
</select>
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code('{$data.template}','')" class="code-show layui-icon layui-icon-tips"></i>*必选</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">排序</label>
<div class="layui-input-inline">
<input type="text" name="sort" value="<?php echo $param_db_array_value['sort'] ?>" placeholder="排序" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code('{$data.sort}','')" class="code-show layui-icon layui-icon-tips"></i>值越小越靠前</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">是否可见</label>
<div class="layui-input-inline">
<select name="sdates" id="sdates" lay-filter="sdates" lay-verify="required">
<option value="0">可见</option>
<option value="1">隐藏</option>
</select>
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code('{$data.sdates}','')" class="code-show layui-icon layui-icon-tips"></i>*必选</div>
</div>
<div style="display: none;" class="layui-form-item jmp-show">
<label class="layui-form-label">跳转连接</label>
<div class="layui-input-inline" style="width: 300px;">
<input type="text" name="url" placeholder="跳转URl 首页可以填/" value="<?php echo $param_db_array_value['url'] ?>" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code('{$data.url}','')" class="code-show layui-icon layui-icon-tips"></i>跳转URl 首页可以填/</div>
</div>
<div style="display: none;" class="layui-form-item jmp-show en-hide">
<label class="layui-form-label en">跳转连接(英)</label>
<div class="layui-input-inline" style="width: 300px;">
<input type="text" name="eurl" placeholder="跳转URl 首页可以填/" value="<?php echo $param_db_array_value['eurl'] ?>" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code('{$data.eurl}','')" class="code-show layui-icon layui-icon-tips"></i>跳转URl 首页可以填/</div>
</div>
<div class="layui-form-item jmp-hide">
<label class="layui-form-label">为静态URL</label>
<div class="layui-input-inline">
<input type="text" name="static_url" value="<?php echo $param_db_array_value['static_url'] ?>" placeholder="为静态URL" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code('{$data.static_url}','')" class="code-show layui-icon layui-icon-tips"></i>留空随机生成 http://xxx/为静态URL.html</div>
</div>
<?php  if($param_db_array_value['seotitle']=='' and $param_db_array_value['seokeywords']=='' and $param_db_array_value['seodescription']=='' and $param_db_array_value['eseotitle']=='' and $param_db_array_value['eseokeywords']=='' and $param_db_array_value['eseodescription']=='' ){; ?>
<div class="seo-show-bin layui-form-item jmp-hide">
<label class="layui-form-label"></label>
<a href="#" onclick="$('.seo-show-bin').hide();$('.seo-show').show();" class="seo-show-a layui-form-mid "><i class="code-show layui-icon layui-icon-addition"></i>显示更多seo设置</a>
</div>
<?php  }; ?>
<div <?php  if($param_db_array_value['seotitle']=='' and $param_db_array_value['seokeywords']=='' and $param_db_array_value['seodescription']=='' and $param_db_array_value['eseotitle']=='' and $param_db_array_value['eseokeywords']=='' and $param_db_array_value['eseodescription']=='' ) echo 'style="display: none;"'; ?>    class="seo-show">
<div class="layui-form-item jmp-hide">
<label class="layui-form-label">SEO标题</label>
<div class="layui-input-inline" style="width: 350px;">
<input type="text" name="seotitle" ondblclick="get_this_placeholder(this)" value="<?php echo $param_db_array_value['seotitle'] ?>" placeholder="{$data.name} - {$config.setup.name}" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code('{$data.seotitle}','')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>
<div class="layui-form-item jmp-hide">
<label class="layui-form-label">SEO关键词</label>
<div class="layui-input-inline" style="width: 350px;">
<input type="text" name="seokeywords" ondblclick="get_this_placeholder(this)" value="<?php echo $param_db_array_value['seokeywords'] ?>" placeholder="{$data.name},{$config.setup.seokeywords}" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code('{$data.seokeywords}','')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>
<div class="layui-form-item jmp-hide">
<label class="layui-form-label">SEO描述</label>
<div style="width: 400px;height: 90px;" class="layui-input-inline">
<textarea style="width: 400px;height: 90px;" ondblclick="get_this_placeholder(this)" name="seodescription" placeholder="{$data.name},{$config.setup.seodescription}" class="layui-input"><?php echo $param_db_array_value['seodescription'] ?></textarea>
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code('{$data.seodescription}','')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>
<div class="layui-form-item jmp-hide en-hide">
<label class="layui-form-label en">SEO标题(英)</label>
<div class="layui-input-inline" style="width: 350px;">
<input type="text" name="eseotitle" ondblclick="get_this_placeholder(this)" value="<?php echo $param_db_array_value['eseotitle'] ?>" placeholder="{$data.ename} - {$config.setup.ename}" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code('{$data.eseotitle}','')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>
<div class="layui-form-item jmp-hide en-hide">
<label class="layui-form-label en">SEO关键词(英)</label>
<div class="layui-input-inline" style="width: 350px;">
<input type="text" name="eseokeywords" ondblclick="get_this_placeholder(this)" value="<?php echo $param_db_array_value['eseokeywords'] ?>" placeholder="{$data.ename},{$config.setup.eseokeywords}" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code('{$data.eseokeywords}','')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>
<div class="layui-form-item jmp-hide en-hide">
<label class="layui-form-label en">SEO描述(英)</label>
<div style="width: 400px;height: 90px;" class="layui-input-inline">
<textarea style="width: 400px;height: 90px;" ondblclick="get_this_placeholder(this)" name="eseodescription" placeholder="{$data.ename},{$config.setup.eseodescription}" class="layui-input"><?php echo $param_db_array_value['eseodescription'] ?></textarea>
</div>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code('{$data.eseodescription}','')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>
</div>
<?php
if (bs_lib::get_configs_value('personality', 'die')==1) {
$param_db_array_value['econtent']=htmlspecialchars_decode($param_db_array_value['emarkdown']=='' ? $param_db_array_value['econtent'] : $param_db_array_value['emarkdown']);
$param_db_array_value['content']=htmlspecialchars_decode($param_db_array_value['markdown']=='' ? $param_db_array_value['content'] : $param_db_array_value['markdown']);
echo '<div  class="layui-form-item page">
<label class="layui-form-label">单页内容</label>
<div class="layui-input-inline" style="width:calc(100% - 230px);;min-width:500px">
<div   id="content-editormd" style="width:100%;z-index: 99;">
<textarea  >' . $param_db_array_value['content'] . '</textarea>
</div>
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div><div  class="layui-form-item page">
<label class="layui-form-label en"></label>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code(\'{$data.content}\',\'\')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>';
echo '<div  class="layui-form-item page en-hide">
<label class="layui-form-label en">单页内容(英)</label>
<div class="layui-input-inline" style="width:calc(100% - 230px);min-width:500px">
<div   id="econtent-editormd" style="width:calc(100% - 230px);z-index: 99;">
<textarea >' . $param_db_array_value['econtent'] . '</textarea>
</div>
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div><div  class="layui-form-item page en-hide">
<label class="layui-form-label en"></label>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code(\'{$data.econtent}\',\'\')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>';
} else {
echo '<div  class="layui-form-item page">
<label class="layui-form-label ">单页内容</label>
<div class="layui-input-inline">
<textarea id="content" name="content" style="width:700px;;height: 350px;">' . $param_db_array_value['content'] . '</textarea>
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div><div  class="layui-form-item page">
<label class="layui-form-label en"></label>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code(\'{$data.content}\',\'\')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>';
echo '<div class="layui-form-item page en-hide">
<label class="layui-form-label en">单页内容(英)</label>
<div class="layui-input-inline">
<textarea id="econtent" name="econtent" style="width:700px;height: 350px;">' . $param_db_array_value['econtent'] . '</textarea>
</div>
<div class="layui-form-mid layui-word-aux"></div>
</div><div class="layui-form-item page en-hide">
<label class="layui-form-label en"></label>
<div class="layui-form-mid layui-word-aux"><i onclick="show_code(\'{$data.econtent}\',\'\')" class="code-show layui-icon layui-icon-tips"></i></div>
</div>';
} ?>
<div class="layui-form-item">
<label class="layui-form-label"></label>
<div class="layui-input-block">
<button class="layui-btn" lay-submit lay-filter="post">保存栏目</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<style>.dtree-zdy-item-this {background-color: #deeefd00 !important;}.dtree-zdy-item:hover {background-color: #deeefd !important;}.dtree-zdy-item cite {font-size: 16px !important;}.dtree-zdy-item:hover cite {color: #1b84ed !important;}.dtree-zdy-dtreefont {font-size: 18px !important;}.dtree-zdy-ficon {color: #2F4056 !important;}.dtree-zdy-icon {color: #2F4056 !important;}.dtree-zdy-checkbox:hover {color: #5FB878 !important;}.dtree-zdy-choose {color: #5FB878 !important;}.dtree-nav-first-line,.dtree-nav-line,.dtree-nav-last-line {line-height: 40px;}</style>
<?php adminechohtnl(); ?>
<div id="foot">Copyright © 2019-2023 <a href="https://www.HDSysCms.Com?pro" target="_blank">HDSysCms <?php echo HDSYS_VERSION; ?></a> <br>
All Rights Reserved </div>
<script src="<?php echo getcdnurlhost() ?>/admin/layui/layui.js"></script>
<script>layui.config({base: '<?php echo getcdnurlhost() ?>/admin/'}).use(['form', 'layer', 'dtree', 'element'], function() {var admin=layui.admin,$=layui.$,form=layui.form,dtree=layui.dtree,element=layui.element;;template();form.on('select(template)', function(data) {template();});function template() {var str='###' + $("#template").val();if (str.indexOf('page') > 0) {$(".page").show();if (typeof content_editormd=='undefined' && typeof editormd_app=='function') {window.content_editormd=editormd_app("content-editormd", '');}if (typeof econtent_editormd=='undefined' && typeof editormd_app=='function') {window.econtent_editormd=editormd_app("econtent-editormd", '');}} else {$(".page").hide();}if ($("#template").val()=='jmp') {$(".page").hide();$(".jmp-hide").hide();$(".jmp-show").show();} else {$(".jmp-hide").show();$(".jmp-show").hide();}};dtree.renderSelect({elem: "#seltree",width: "100%",url: "index.php?m=manage&c=Category&a=select_ajax",done: function(res, $ul, first) {if (first) {dtree.dataInit("seltree", "<?php echo (int)$param_db_array_value['pid']; ?>");var selectParam=dtree.selectVal("seltree");}},line: true,skin: "zdy",initLevel: 5,none: "暂时没有栏目，请先去添加栏目",ficon: ["-1", "-1"],});$("body").on("click", function(event) {$("div[dtree-id][dtree-select]").removeClass("layui-form-selected");$("div[dtree-id][dtree-card]").removeClass("dtree-select-show layui-anim layui-anim-upbit");});form.on('submit(post)', function(data) {data=data.field;if (data.template=='') {layer.msg('请选择视图模版');return false;}data.content='';data.econtent='';if (typeof editor_content !=='undefined') {data.content=editor_content.html();data.econtent=editor_econtent.html();}if (typeof content_editormd !=='undefined') {data.markdown=content_editormd.getMarkdown();data.emarkdown=econtent_editormd.getMarkdown();data.content=content_editormd.getPreviewedHTML();data.econtent=econtent_editormd.getPreviewedHTML();}layer.load(1);$.ajax({type: "post",url: 'index.php?m=manage&c=Category&a=edit_ajax',data: {pid: data.seltree_select_nodeId,id: '<?php echo $param_db_array_value['id'] ?>',name: data.name,ename: data.ename,template: data.template,static_url: data.static_url,seotitle: data.seotitle,eseotitle: data.eseotitle,seokeywords: data.seokeywords,eseokeywords: data.eseokeywords,seodescription: data.seodescription,eseodescription: data.eseodescription,content: data.content,econtent: data.econtent,sdates: data.sdates,url: data.url,eurl: data.eurl,sort: data.sort,markdown: data.markdown,emarkdown: data.emarkdown},dataType: "json",success: function(ret) {layer.closeAll('loading');if (ret.code==1) {layer.confirm(ret.msg, {btn: ['确定完成', '停留继续操作']}, function() {location.href="index.php?m=manage&c=<?php echo set_get('c'); ?>&a=table"});} else {layer.msg(ret.msg);}}});return false;});});select_set_text('template', '<?php echo $param_db_array_value['template'] ?>');select_set_text('sdates', '<?php echo $param_db_array_value['sdates'] ?>');</script>
<?php
if (bs_lib::get_configs_value('personality', 'die')==1) {
echo "
<script src='" . getcdnurlhost() . "/markdown/js/jquery.min.js'></script>
<script src='" . getcdnurlhost() . "/markdown/js/zepto.min.js'></script>
<script src='" . getcdnurlhost() . "/markdown/editormd.min.js'></script>
<script src='" . getcdnurlhost() . "/markdown/app.js'></script>
";
} else {
echo "
<script charset='utf-8' src='" . getcdnurlhost() . "/kindeditor/kindeditor-all-min.js'></script>
<script charset='utf-8' src='" . getcdnurlhost() . "/kindeditor/app.js'></script>
";
}
?>
</body>
</html>